var http = require('http');
// var url = require('url');
// var util = require('util');
// var sha1 = require('sha1');
// var fs = require('fs');
// var querystring = require('querystring');
var routeToGet = require('./route/routeToGet');
var routeToPost = require('./route/routeToPost');

http.createServer(function(req, res) {
	if (req.method == "GET") {
		
		routeToGet(req, res);

	} else if (req.method == "POST") {

		routeToPost(req, res);

	}
}).listen(8012)

console.log('-------------------------' +
	'Server running at http://127.0.0.1:8012/  -------------------------');
